#ifndef __LINEMESH_H__
#define __LINEMESH_H__

#include <GL/glut.h>

#include "CoordF.h"
#include "Drawable.h"
#include "Line.h"

/*
 * Classe: LineMesh
 *  Herda de: Drawable
 *
 *   Mesh composto de linhas tridimensionais
 *
*/

class LineMesh : public Drawable
{
      private:
          CoordF *vertex;
          int    numVerts;
          GLfloat scale;
          
      protected:
          virtual void render();
          
          void setScaleFromVertexes();
          void normalizeVertexSpace();
          void destroyMesh();
      
      public:
          LineMesh () { numVerts=0; scale=1.0; }
          LineMesh (CoordF p) : Drawable (p) { numVerts=0; scale=1.0; }
          LineMesh (CoordF p, CoordF r) : Drawable (p, r) { scale=1.0; }
          LineMesh (CoordF vex[], int n) { vertex = vex; numVerts=n; setScaleFromVertexes(); normalizeVertexSpace(); }
          LineMesh (CoordF vex[], int n, GLfloat sc) { vertex = vex; numVerts=n; scale = sc; }
          LineMesh (CoordF p, CoordF vex[], int n) : Drawable (p) { vertex = vex; numVerts=n; setScaleFromVertexes(); normalizeVertexSpace(); }
          LineMesh (CoordF p, CoordF vex[], int n, GLfloat sc) : Drawable (p) { vertex = vex; numVerts=n; scale = sc; }
          LineMesh (CoordF p, CoordF r, CoordF vex[], int n) : Drawable (p, r) { vertex = vex; numVerts=n; setScaleFromVertexes(); normalizeVertexSpace(); }
          LineMesh (CoordF p, CoordF r, CoordF vex[], int n, GLfloat sc) : Drawable (p, r) { vertex = vex; numVerts=n; scale = sc; }
          ~LineMesh() { destroyMesh(); }
          
          
};

#endif
